//
//  Tool.h
//  Eath
//
//  Created by yuhaya on 14-8-24.
//  Copyright (c) 2014年 yuhaya. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Tool : NSObject

+ (UIColor *) colorWithHexString: (NSString *)color;

+ (Boolean) networkStatus;

+ (void) showMessage:(NSString *)str;

+ (AFHTTPRequestOperationManager *) httpManager;

+ (void) downloadFile:(NSString *)fileUrl;

+ (NSString *)getDateStringWithDate:(NSDate *)date DateFormat:(NSString *)formatString;
+ (NSString *)getTimeampWithString:(NSString *)timeString DateFormat:(NSString *)formatString;

+ (NSString *)pre_week_date:(NSDate *)date andFormat:(NSString *)format;
+ (NSDate *)bre_week_date_obj:(NSDate *)date;
+ (NSDate *)next_week_date_obj:(NSDate *)date;

+ (NSNumber *)time_str_num:(NSString *)time;
+ (NSString *)weekBytimeamp:(NSUInteger)timeamp;

+ (BOOL) setUserSetting:(NSString *)stuid andItem:(NSString *)item andVal:(NSString *)val;
+ (NSString *) getUserSetting:(NSString *)stuid andItem:(NSString *)item;

+(BOOL) isValidateEmail:(NSString *)email;
+(BOOL) isValidateMobile:(NSString *)mobile;
+(BOOL) validateCarNo:(NSString*) carNo;

+ (void) cacheStudentId:(NSArray *)data;//缓存最新的用户的id

+ (void) showNotice:(NSString *) notice withSound:(BOOL) soundFlag withShake:(BOOL ) shakeFlag;

+(float) tableHeight;
@end
